Integrand size = 31, antiderivative size = 52 \[ \int \frac {\cos (c+d x) \left (A+C \sec ^2(c+d x)\right )}{a+a \sec (c+d x)} \, dx=-\frac {A x}{a}+\frac {(2 A+C) \sin (c+d x)}{a d}-\frac {(A+C) \sin (c+d x)}{d (a+a \sec (c+d x))} \]
[Out]
Time = 0.12 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.129, Rules used = {4170, 3872, 2717, 8} \[ \int \frac {\cos (c+d x) \left (A+C \sec ^2(c+d x)\right )}{a+a \sec (c+d x)} \, dx=\frac {(2 A+C) \sin (c+d x)}{a d}-\frac {(A+C) \sin (c+d x)}{d (a \sec (c+d x)+a)}-\frac {A x}{a} \]
[In]
[Out]
Rule 8
Rule 2717
Rule 3872
Rule 4170
Rubi steps \begin{align*} \text {integral}& = -\frac {(A+C) \sin (c+d x)}{d (a+a \sec (c+d x))}-\frac {\int \cos (c+d x) (-a (2 A+C)+a A \sec (c+d x)) \, dx}{a^2} \\ & = -\frac {(A+C) \sin (c+d x)}{d (a+a \sec (c+d x))}-\frac {A \int 1 \, dx}{a}+\frac {(2 A+C) \int \cos (c+d x) \, dx}{a} \\ & = -\frac {A x}{a}+\frac {(2 A+C) \sin (c+d x)}{a d}-\frac {(A+C) \sin (c+d x)}{d (a+a \sec (c+d x))} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(108\) vs. \(2(52)=104\).
Time = 0.78 (sec) , antiderivative size = 108, normalized size of antiderivative = 2.08 \[ \int \frac {\cos (c+d x) \left (A+C \sec ^2(c+d x)\right )}{a+a \sec (c+d x)} \, dx=\frac {\sec \left (\frac {c}{2}\right ) \sec \left (\frac {1}{2} (c+d x)\right ) \left (-2 A d x \cos \left (\frac {d x}{2}\right )-2 A d x \cos \left (c+\frac {d x}{2}\right )+5 A \sin \left (\frac {d x}{2}\right )+4 C \sin \left (\frac {d x}{2}\right )+A \sin \left (c+\frac {d x}{2}\right )+A \sin \left (c+\frac {3 d x}{2}\right )+A \sin \left (2 c+\frac {3 d x}{2}\right )\right )}{4 a d} \]
[In]
[Out]
Time = 0.18 (sec) , antiderivative size = 37, normalized size of antiderivative = 0.71
method | result | size |
parallelrisch | \(\frac {-d x A +\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (A \cos \left (d x +c \right )+2 A +C \right )}{d a}\) | \(37\) |
derivativedivides | \(\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) A +\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C -4 A \left (-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 \left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )}+\frac {\arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}\right )}{d a}\) | \(73\) |
default | \(\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) A +\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C -4 A \left (-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 \left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )}+\frac {\arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}\right )}{d a}\) | \(73\) |
risch | \(-\frac {A x}{a}-\frac {i A \,{\mathrm e}^{i \left (d x +c \right )}}{2 a d}+\frac {i A \,{\mathrm e}^{-i \left (d x +c \right )}}{2 a d}+\frac {2 i A}{d a \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}+\frac {2 i C}{d a \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}\) | \(93\) |
norman | \(\frac {\frac {A x}{a}+\frac {\left (A +C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{a d}+\frac {2 A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{a d}-\frac {A x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{a}-\frac {\left (3 A +C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )}\) | \(120\) |
[In]
[Out]
none
Time = 0.25 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.02 \[ \int \frac {\cos (c+d x) \left (A+C \sec ^2(c+d x)\right )}{a+a \sec (c+d x)} \, dx=-\frac {A d x \cos \left (d x + c\right ) + A d x - {\left (A \cos \left (d x + c\right ) + 2 \, A + C\right )} \sin \left (d x + c\right )}{a d \cos \left (d x + c\right ) + a d} \]
[In]
[Out]
\[ \int \frac {\cos (c+d x) \left (A+C \sec ^2(c+d x)\right )}{a+a \sec (c+d x)} \, dx=\frac {\int \frac {A \cos {\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx + \int \frac {C \cos {\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx}{a} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 117 vs. \(2 (52) = 104\).
Time = 0.29 (sec) , antiderivative size = 117, normalized size of antiderivative = 2.25 \[ \int \frac {\cos (c+d x) \left (A+C \sec ^2(c+d x)\right )}{a+a \sec (c+d x)} \, dx=-\frac {A {\left (\frac {2 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} - \frac {2 \, \sin \left (d x + c\right )}{{\left (a + \frac {a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}} - \frac {\sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}\right )} - \frac {C \sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}}{d} \]
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.42 \[ \int \frac {\cos (c+d x) \left (A+C \sec ^2(c+d x)\right )}{a+a \sec (c+d x)} \, dx=-\frac {\frac {{\left (d x + c\right )} A}{a} - \frac {A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a} - \frac {2 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )} a}}{d} \]
[In]
[Out]
Time = 14.86 (sec) , antiderivative size = 59, normalized size of antiderivative = 1.13 \[ \int \frac {\cos (c+d x) \left (A+C \sec ^2(c+d x)\right )}{a+a \sec (c+d x)} \, dx=\frac {2\,A\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a\right )}-\frac {A\,x}{a}+\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (A+C\right )}{a\,d} \]
[In]
[Out]